package com.hospital.demo.controller.gaoyuran;

import com.hospital.demo.model.gaoyuran.Equipment_use;
import com.hospital.demo.service.gaoyuran.Equipment_useSer;
import com.hospital.demo.util.ResultUtils;
import com.hospital.demo.util.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/equipment_use")
@Api(tags={"G_器材使用接口"})
public class Equipment_useCon {

    @Autowired
    private Equipment_useSer equipment_useSer;


    @ApiOperation(value = "获取全部器材使用信息", notes = "")
    @GetMapping("/findallequipment_use")
    private ResultVO findallequipment_use() {
        return ResultUtils.success(equipment_useSer.findallequipment_use());
    }



    @ApiOperation(value = "添加器材使用信息", notes = "")
    @PostMapping("/AddEquipment_use")
    private ResultVO AddEquipment_use(Equipment_use equipment_use) {
        return ResultUtils.success(equipment_useSer.AddEquipment_use(equipment_use));
    }

    @ApiOperation(value = "更新器材信息", notes = "")
    @PostMapping("/upDateEquipment_use")
    private ResultVO upDateEquipment_use(Equipment_use equipment_use) {
        return ResultUtils.success(equipment_useSer.upDateEquipment_use(equipment_use));
    }

    @ApiOperation(value = "通过id删除器材信息", notes = "")
    @PostMapping("/delEquipmentById")
    private ResultVO delEquipmentById(@RequestParam(name = "uid", defaultValue = "-1") Integer uid ){
        return ResultUtils.success(equipment_useSer.delEquipmentById(uid));
    }
}
